<%@page contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Register</title>
    <style>
        .error {
            background-color: #ffcccc;
            border: 2px solid red;
        }
    </style>
</head>
<body>
<%--<s:url var="cp" value="${pageContext.request.contextPath}"/>--%>
<%--<h1>Welcome to Spitter!</h1>--%>
<h1>Register Page</h1>
<sf:form method="POST" commandName="spitter" enctype="multipart/form-data">
    <sf:errors path="*" element="div" cssClass="error"/>
    <label>Profile Picture</label>:<input type="file" name="profilePicture"
    accept="image/jpeg,image/png,image/gif"/><br/>
    <sf:label path="firstName" cssErrorClass="error">FirstName</sf:label>
    <sf:input path="firstName" autocomplete="false"/>
    <%--<sf:errors path="firstName" cssClass="error"/> --%>
    <br/>
    <sf:label path="lastName" cssErrorClass="error">LastName</sf:label>
    <sf:input path="lastName" autocomplete="false"/>
    <%--<sf:errors path="lastName"  cssClass="error"/>--%>
    <br/>
    <sf:label path="email" cssErrorClass="error">Email</sf:label>
    <sf:input path="email" autocomplete="false"/>
    <%--<sf:errors path="email"  cssClass="error"/>--%>
    <br/>
    <sf:label path="userName" cssErrorClass="error">UserName</sf:label>
    <sf:input path="userName" autocomplete="false"/>
    <%--<sf:errors path="userName"  cssClass="error"/>--%>
    <br/>
    <sf:label path="password" cssErrorClass="error">Password</sf:label>
    <sf:password path="password" autocomplete="false"/>
    <%--<sf:errors path="password"  cssClass="error"/>--%>
    <br/>
    <input type="submit" value="Register"/>
</sf:form>

</body>
</html>
